﻿using Core.Domain.Customers;
using System.Data.Entity.ModelConfiguration;

namespace Data.Mapping.Customers
{
    public partial class WorkExperienceMap : EntityTypeConfiguration<WorkExperience>
    {
        public WorkExperienceMap()
        {
            this.ToTable("WorkExperience");
            this.HasKey(c => c.Id);
            this.Property(u => u.Company).HasMaxLength(100);
            this.Property(u => u.JobName).HasMaxLength(100);
            this.Property(u => u.JobName).HasMaxLength(100);
            this.Property(u => u.Salary).HasMaxLength(100);
            this.Property(u => u.WorkMemo).IsMaxLength();

            this.HasRequired(rr => rr.Resume)
                .WithMany(c => c.WorkExperience)
                .HasForeignKey(rr => rr.ResumeId);
        }
    }
}
